package com.tencent.wxpay.service;

import com.tencent.wxpay.common.Configure;
import com.tencent.wxpay.protocol.request.DownloadBillReqData;

/**
 * 下载对账单接口
 */
public class DownloadBillService extends BaseService{

    /**
     * 下载对账单接口构造方法，设置接口url
     * @throws IllegalAccessException
     * @throws InstantiationException
     * @throws ClassNotFoundException
     */
    public DownloadBillService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(Configure.DOWNLOAD_BILL_API);
    }

    /**
     * 请求下载对账单接口
     * @param downloadBillReqData 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的XML数据
     * @throws Exception
     */
    public String request(DownloadBillReqData downloadBillReqData) throws Exception {
        return sendPost(downloadBillReqData);
    }
}
